﻿using M6R小圆柱注液机.Pages;
using M6R小圆柱注液机.TaskList;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using FastData;
using FastCtr;

namespace M6R小圆柱注液机.Data
{
    class GlobalValues
    {
        /// <summary>
        /// 状态全局变量
        /// </summary>
        public struct StatusVariable
        {
            /// <summary>
            /// 程序运行状态
            /// true：运行状态；false：停止状态
            /// </summary>
            public static bool status_Program_Running;
            /// <summary>
            /// 自动运行状态
            /// </summary>
            public static bool status_AutoRunning;
            /// <summary>
            /// 允许允许程序
            /// 主界面的启动按钮可以点击
            /// </summary>
            public static bool status_AllowStartProgarm;
            /// <summary>
            /// MFG的状态，用于屏蔽MFG
            /// true：开启状态；false：屏蔽状态
            /// </summary>
            public static bool status_MFG_Running;
            /// <summary>
            /// 操作员登录状态，默认为false 未登录状态
            /// </summary>
            public static bool isLoginSuccess;
            /// <summary>
            /// 管理员登录状态，默认为false 未登录状态
            /// </summary>
            public static bool isAdminLoginSuccess;
            /// <summary>
            /// 工程师登录状态，默认为false 未登录状态
            /// </summary>
            public static bool isEngineerLoginSuccess;


            /// <summary>
            /// 操作员用户名验证成功？
            /// </summary>
            public static bool isOperatorNameCheckOutSuccess;
            /// <summary>
            /// 资产编码验证成功？（设备号）
            /// </summary>
            public static bool isAssetsEncodingCheckOutSuccess;
            /// <summary>
            /// 成品编码验证成功？
            /// </summary>
            public static bool isFinishedProductCodingCheckOutSuccess;
            /// <summary>
            /// 电解液验证成功？
            /// </summary>
            public static bool isElectrolyteNumberCheckOutSuccess;
            /// <summary>
            /// 这个变量适用于监控线程的状态（0：线程未运行状态，1：线程运行状态）
            /// 0：数据采集类中，程序进程的线程
            /// 1：数据采集类中，PLC的触发线程
            /// 2：数据采集类中，自动运行的线程
            /// </summary>
            //public static int[] TaskStatus = new int[10];

            /// <summary>
            /// 电芯条码是否使用随机码
            /// </summary>
            public static bool isUseRadomCode = true;

            /// <summary>
            /// 是否开启GRR模式
            /// </summary>
            public static bool isStartGRR = false;
        }

        /// <summary>
        /// 路径全局变量
        /// </summary>
        public struct PathVariable
        {
            //文件夹路径


            //文件路径
            public static string fileCommonPara = new DirectoryInfo("../../../ConfigurationData/CommonPara.ini").FullName;
            public static string fileXML = new DirectoryInfo("../../../ConfigurationData/ConfigurationFile").FullName;
            //CPK值得文件路径
            public static string fileCPK_1 = "E:\\Configuration\\CPK数据\\CPK_1\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_2 = "E:\\Configuration\\CPK数据\\CPK_2\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_3 = "E:\\Configuration\\CPK数据\\CPK_3\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_4 = "E:\\Configuration\\CPK数据\\CPK_4\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_5 = "E:\\Configuration\\CPK数据\\CPK_5\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_6 = "E:\\Configuration\\CPK数据\\CPK_6\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            //CPK补偿值的文件路径
            public static string fileCPK_Offset_1 = "E:\\Configuration\\CPK数据\\CPK_Offset_1\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_Offset_2 = "E:\\Configuration\\CPK数据\\CPK_Offset_2\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_Offset_3 = "E:\\Configuration\\CPK数据\\CPK_Offset_3\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_Offset_4 = "E:\\Configuration\\CPK数据\\CPK_Offset_4\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_Offset_5 = "E:\\Configuration\\CPK数据\\CPK_Offset_5\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileCPK_Offset_6 = "E:\\Configuration\\CPK数据\\CPK_Offset_6\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";

            //chart 注液量数据保存
            public static string fileNeedle_1Value = "E:\\Configuration\\Chart\\needle1\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileNeedle_2Value = "E:\\Configuration\\Chart\\needle2\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileNeedle_3Value = "E:\\Configuration\\Chart\\needle3\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileNeedle_4Value = "E:\\Configuration\\Chart\\needle4\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileNeedle_5Value = "E:\\Configuration\\Chart\\needle5\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string fileNeedle_6Value = "E:\\Configuration\\Chart\\needle6\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";

            //GRR文件路径
            public static string weight1_1 = "E:\\Configuration\\GRR\\1_1_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string weight1_2 = "E:\\Configuration\\GRR\\1_2_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string weight2_1 = "E:\\Configuration\\GRR\\2_1_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string weight2_2 = "E:\\Configuration\\GRR\\2_2_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";

            //备用数据文件路径
            public static string weightFront1_1 = "E:\\Configuration\\Data\\Front_1\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string weightFront1_2 = "E:\\Configuration\\Data\\Front_2\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string all_1 = "E:\\Configuration\\Data\\Behind_1\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
            public static string all_2 = "E:\\Configuration\\Data\\Behind_2\\" + DateTime.Now.ToString("yyyyMMdd") + ".txt";

            //数据库路径
            public static string dataBasePath = xml_Helper.ReadXml(PathVariable.fileXML, "mySqlConnStr");
        }


        /// <summary>
        /// 通用变量
        /// </summary>
        public struct CommonVariable
        {
            /// <summary>
            /// 操作员名称
            /// </summary>
            public static string operatorNameInfo;
            /// <summary>
            /// 成品编码
            /// </summary>
            public static string finishedProductCodingInfo;
            /// <summary>
            /// 电解液批次号
            /// </summary>
            public static string electrolyteNumberInfo;
            /// <summary>
            /// 班次
            /// </summary>
            public static string shiftInfo;
            /// <summary>
            /// 资产信息（设备号）
            /// </summary>
            public static string mechineInfo;
            /// <summary>
            /// 注液量补偿的闭环周期
            /// </summary>
            public static int closedLoopTRAS;

            /// <summary>
            /// 注液量最小值
            /// </summary>
            public static double NoteLiquidWeightMin;
            /// <summary>
            /// 注液量最大值
            /// </summary>
            public static double NoteLiquidWeightMax;
            /// <summary>
            ///  电池重量最大值
            /// </summary>
            public static double BatteryWeightMax;
            /// <summary>
            ///  电池重量最小值
            /// </summary>
            public static double BatteryWeightMin;

        }

        /// <summary>
        /// PLC 交互变量名称
        /// </summary>
        public struct PLCVariableName
        {
            /// <summary>
            /// 电子秤1的触发信号
            /// 0：默认初始; 1:PL读值C触发；2：PC接收到读值触发；3：扫描完成；4：PLC清零触发；5：PC接收到清零触发-1：报错，未扫到条码
            /// </summary>
            public const string weight_1TriggerVariableName = "commPC.iWeigh1.send";
            /// <summary>
            /// 电子秤2的触发信号
            ///  0：默认初始; 1:PL读值C触发；2：PC接收到读值触发；3：扫描完成；4：PLC清零触发；5：PC接收到清零触发-1：报错，未扫到条码
            /// </summary>
            public const string weight_2TriggerVariableName = "commPC.iWeigh2.send";
            /// <summary>
            /// 电子秤3的触发信号
            ///  0：默认初始; 1:PL读值C触发；2：PC接收到读值触发；3：扫描完成；4：PLC清零触发；5：PC接收到清零触发-1：报错，未扫到条码
            /// </summary>
            public const string weight_3TriggerVariableName = "commPC.oWeigh1.send";
            /// <summary>
            /// 电子秤4的触发信号
            ///  0：默认初始; 1:PL读值C触发；2：PC接收到读值触发；3：扫描完成；4：PLC清零触发；5：PC接收到清零触发-1：报错，未扫到条码
            /// </summary>
            public const string weight_4TriggerVariableName = "commPC.oWeigh2.send";

            /// <summary>
            /// 前称1 称重值
            /// </summary>
            public const string weight_1Value = "commPC.iWeigh1.weighValue";
            /// <summary>
            /// 前2 称重值
            /// </summary>
            public const string weight_2Value = "commPC.iWeigh2.weighValue";
            /// <summary>
            /// 后1 称重值
            /// </summary>
            public const string weight_3Value = "commPC.oWeigh1.weighValue";
            /// <summary>
            /// 后2 称重值
            /// </summary>
            public const string weight_4Value = "commPC.oWeigh2.weighValue";

            /// <summary>
            /// 1号 注液量
            /// </summary>
            public const string resultValue1 = "commPC.oWeigh1.injectionValue";
            /// <summary>
            /// 2号 注液量
            /// </summary>
            public const string resultValue2 = "commPC.oWeigh2.injectionValue";

            /// <summary>
            /// 前1 条码（读PLC）
            /// </summary>
            public const string weight_1Code = "commPC.iWeigh1.ID";
            /// <summary>
            /// 前2 条码（读PLC）
            /// </summary>
            public const string weight_2Code = "commPC.iWeigh2.ID";
            /// <summary>
            /// 后1 条码（读PLC）
            /// </summary>
            public const string weight_3Code = "commPC.oWeigh1.ID";
            /// <summary>
            /// 后2 条码（读PLC）
            /// </summary>
            public const string weight_4Code = "commPC.oWeigh2.ID";


            /// <summary>
            /// 针头1 补偿值，触发PLC写入
            /// </summary>
            public const string neddle_1OffsetTrigger = "para[262]";
            /// <summary>
            /// 针头1 补偿值，触发PLC写入
            /// </summary>
            public const string neddle_2OffsetTrigger = "para[263]";
            /// <summary>
            /// 针头1 补偿值，触发PLC写入
            /// </summary>
            public const string neddle_3OffsetTrigger = "para[266]";
            /// <summary>
            /// 针头1 补偿值，触发PLC写入
            /// </summary>
            public const string neddle_4OffsetTrigger = "para[267]";
            /// <summary>
            /// 针头1 补偿值，触发PLC写入
            /// </summary>
            public const string neddle_5OffsetTrigger = "para[252]";
            /// <summary>
            /// 针头1 补偿值，触发PLC写入
            /// </summary>
            public const string neddle_6OffsetTrigger = "para[253]";

            /// <summary>
            /// 针头1 补偿值
            /// </summary>
            public const string neddle_1Offset = "R_Compensate_1";
            /// <summary>
            /// 针头2 补偿值
            /// </summary>
            public const string neddle_2Offset = "L_Compensate_1";
            /// <summary>
            /// 针头3补偿值
            /// </summary>
            public const string neddle_3Offset = "R_Compensate_2";
            /// <summary>
            /// 针头4 补偿值
            /// </summary>
            public const string neddle_4Offset = "L_Compensate_2";
            /// <summary>
            /// 针头5 补偿值
            /// </summary>
            public const string neddle_5Offset = "R_Compensate_3";
            /// <summary>
            /// 针头6 补偿值
            /// </summary>
            public const string neddle_6Offset = "L_Compensate_3";



            /// <summary>
            /// 扫码枪1 触发信号
            /// 0：默认初始; 1:PLC触发；2：PC接收到触发；3：扫描完成；-1：报错，未扫到条码
            /// </summary>
            public const string scanner_1TriggerVariableName = "commPC.scanClip.send";
            /// <summary>
            /// 扫码枪2 触发信号
            /// 0：默认初始; 1:PLC触发；2：PC接收到触发；3：扫描完成；-1：报错，未扫到条码
            /// </summary>
            public const string scanner_2TriggerVariableName = "commPC.scan1.send";
            /// <summary>
            /// 扫码枪3 触发信号
            /// 0：默认初始; 1:PLC触发；2：PC接收到触发；3：扫描完成；-1：报错，未扫到条码
            /// </summary>
            public const string scanner_3TriggerVariableName = "commPC.scan2.send";

            /// <summary>
            /// 1号扫码枪扫得条码（对应弹夹的条码），写给PLC所对应的变量名
            /// </summary>
            public const string scanner_1CodeVariableName = "commPC.scanClip.ID";
            /// <summary>
            /// 2号扫码枪扫得条码（对应前1 电子秤的电芯），写给PLC所对应的变量名
            /// </summary>
            public const string scanner_2CodeVariableName = "commPC.scan1.ID";
            /// <summary>
            /// 3号扫码枪扫得条码（对应前2 电子秤的电芯），写给PLC所对应的变量名
            /// </summary>
            public const string scanner_3CodeVariableName = "commPC.scan2.ID";




            /// <summary>
            /// 固定时间给PLC写值。以此作为心跳信号
            /// </summary>
            public const string HeartVariableName = "Heart";

            /// <summary>
            /// PLC报警触发，PC端记录报警信息
            /// </summary>
            public const string AlarmTriggerVariableName = "asd7";
        }



        /// <summary>
        /// 扫码枪的触发命令
        /// </summary>
        public struct ScannerTrigherCommand
        {
            /// <summary>
            /// 触发扫条码,开始扫码
            /// </summary>
            public const string StartTrigger = "LON\r\n";
            /// <summary>
            /// 触发扫条码，停止扫码
            /// </summary>
            public const string StopTrigger = "LOFF\r\n";
            /// <summary>
            /// 重置复位
            /// </summary>
            public const string scanReset = "RESET\r\n";
            /// <summary>
            /// 发送缓冲清除
            /// </summary>
            public const string scanBufferCaler = "BCLR\r\n";
        }







        //声明引用
        public static ProductDataAcq productDataAcq = new ProductDataAcq();//数据采集与存储线程
        public static AlarmAcq alarmAcq = new AlarmAcq();//报警采集与存储线程

        public static LoginPage loginPage = new LoginPage();//登录界面
        public static MainPage mainPage = new MainPage();//主页
        public static SettingPage settingPage = new SettingPage();//设置界面
        public static ProductInquiryPage productInquiryPage = new ProductInquiryPage();//数据查询界面
        public static AlarmInquiryPage alarmInquiryPage = new AlarmInquiryPage();//报警查询界面
        public static ChartPage chartPage = new ChartPage();//图表界面
        public static PointCheck pointCheck = new PointCheck();//电子秤点检界面
        public static ElectrolyteChangingPage electrolyteChangingPage;//更换电解液界面

        public static NewSerialPort serialPort1 = new NewSerialPort("Fore_And1_serialPort");    //初始化全局串口1
        public static NewSerialPort serialPort2 = new NewSerialPort("Fore_And2_serialPort");    //初始化全局串口2
        public static NewSerialPort serialPort3 = new NewSerialPort("Behind_And1_serialPort");//初始化全局串口3
        public static NewSerialPort serialPort4 = new NewSerialPort("Behind_And2_serialPort");//初始化全局串口4
        public static NewSerialPort serialPort5 = new NewSerialPort("MFG_serialPort1");//初始化全局串口5
        public static NewSerialPort serialPort6 = new NewSerialPort("MFG_serialPort2");//初始化全局串口5
        public static NewSerialPort serialPort7 = new NewSerialPort("MFG_serialPort3");//初始化全局串口5
        public static ANDweigh Fore_And1 = new ANDweigh(serialPort1);    //初始化 电子秤前1
        public static ANDweigh Fore_And2 = new ANDweigh(serialPort2);    //初始化 电子秤前2
        public static ANDweigh Behind_And1 = new ANDweigh(serialPort3);//初始化 电子秤后1
        public static ANDweigh Behind_And2 = new ANDweigh(serialPort4);//初始化 电子秤后2

        public static NewTCP newScanner_1 = new NewTCP("Scanner_1");//初始化 扫码枪 1号
        public static NewTCP newScanner_2 = new NewTCP("Scanner_2");//初始化 扫码枪 2号
        public static NewTCP newScanner_3 = new NewTCP("Scanner_3");//初始化 扫码枪 3号

        public static OmroPLC om = new OmroPLC("123");
        public static NjOmroPLC njOmronPLC = new NjOmroPLC("PLC_Config");


        public static Log_Helper log_Helper = new Log_Helper("Logs");
        public static Xml_Helper xml_Helper = new Xml_Helper();
        public static MySQL mysql_Helper = new MySQL();








        /// <summary>
        /// 初始化，确认指定路径下文件、文件夹是否存在？不存在，创建
        /// </summary>
        public static void InitCheckFileExit()
        {
            Folder_Helper.CreateFolder("E:\\Configuration\\点检结果");
            //CPK文件的路径
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_1");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_2");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_3");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_4");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_5");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_6");
            //CPK补偿值文件的路径
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_Offset_1");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_Offset_2");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_Offset_3");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_Offset_4");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_Offset_5");
            Folder_Helper.CreateFolder("E:\\Configuration\\CPK数据\\CPK_Offset_6");
            //Chart数据文件的路径
            Folder_Helper.CreateFolder("E:\\Configuration\\Chart\\needle1");
            Folder_Helper.CreateFolder("E:\\Configuration\\Chart\\needle2");
            Folder_Helper.CreateFolder("E:\\Configuration\\Chart\\needle3");
            Folder_Helper.CreateFolder("E:\\Configuration\\Chart\\needle4");
            Folder_Helper.CreateFolder("E:\\Configuration\\Chart\\needle5");
            Folder_Helper.CreateFolder("E:\\Configuration\\Chart\\needle6");
            //用于上传MFG的数据文件的路径
            Folder_Helper.CreateFolder("E:\\MatchData");
            //GRR文件路径
            Folder_Helper.CreateFolder("E:\\Configuration\\GRR");
            //备用数据文件的路径
            Folder_Helper.CreateFolder("E:\\Configuration\\Data");
            Folder_Helper.CreateFolder("E:\\Configuration\\Data\\Front_1");
            Folder_Helper.CreateFolder("E:\\Configuration\\Data\\Front_2");
            Folder_Helper.CreateFolder("E:\\Configuration\\Data\\Behind_1");
            Folder_Helper.CreateFolder("E:\\Configuration\\Data\\Behind_2");


            //检查指定路径下的文件数量，超过一定数量，自动删除早期文件
            //CPK
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_2", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_3", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_4", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_5", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_6", 30);//检查指定路径下的文件数量
            //CPK OFFSET
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_Offset_1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_Offset_2", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_Offset_3", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_Offset_4", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_Offset_5", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\CPK数据\\CPK_Offset_6", 30);//检查指定路径下的文件数量
            //CHART
            Folder_Helper.CheckFileCount("E:\\Configuration\\Chart\\needle1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\Chart\\needle1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\Chart\\needle1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\Chart\\needle1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\Chart\\needle1", 30);//检查指定路径下的文件数量
            Folder_Helper.CheckFileCount("E:\\Configuration\\Chart\\needle1", 30);//检查指定路径下的文件数量
            //log文件
            Folder_Helper.CheckFileCount(new DirectoryInfo("../../../Logs").FullName, 100);//检查指定路径下的文件数量


            //创建文件
            SaveStatic.FileExist(PathVariable.fileNeedle_1Value);
            SaveStatic.FileExist(PathVariable.fileNeedle_2Value);
            SaveStatic.FileExist(PathVariable.fileNeedle_3Value);
            SaveStatic.FileExist(PathVariable.fileNeedle_4Value);
            SaveStatic.FileExist(PathVariable.fileNeedle_5Value);
            SaveStatic.FileExist(PathVariable.fileNeedle_6Value);
        }



        /// <summary>
        /// 初始化 全局变量
        /// </summary>
        public static void InitGlobalVariableValue()
        {
            //状态变量
            StatusVariable.status_Program_Running = true;
            StatusVariable.status_AutoRunning = false;
            StatusVariable.status_AllowStartProgarm = false;
            StatusVariable.status_MFG_Running = true;//MFG的状态 默认是开启的

            StatusVariable.isLoginSuccess = false;

            StatusVariable.isOperatorNameCheckOutSuccess = false;
            StatusVariable.isAssetsEncodingCheckOutSuccess = false;
            StatusVariable.isFinishedProductCodingCheckOutSuccess = false;
            StatusVariable.isElectrolyteNumberCheckOutSuccess = false;


            //值变量
            CommonVariable.operatorNameInfo = "-";
            CommonVariable.finishedProductCodingInfo = "-";
            CommonVariable.electrolyteNumberInfo = "-";
            CommonVariable.shiftInfo = "-";
            CommonVariable.mechineInfo = "-";
            CommonVariable.closedLoopTRAS = Convert.ToInt32(SaveStatic.ReadIni(GlobalValues.PathVariable.fileCommonPara, "CheckOut_Para", "ClosedLoopTRAS"));

            CommonVariable.BatteryWeightMin = Convert.ToDouble(SaveStatic.ReadIni(GlobalValues.PathVariable.fileCommonPara, "MainPage_Para", "BatteryWeightMin"));
            CommonVariable.BatteryWeightMax = Convert.ToDouble(SaveStatic.ReadIni(GlobalValues.PathVariable.fileCommonPara, "MainPage_Para", "BatteryWeightMax"));
            CommonVariable.NoteLiquidWeightMin = Convert.ToDouble(SaveStatic.ReadIni(GlobalValues.PathVariable.fileCommonPara, "MainPage_Para", "NoteLiquidWeightMin"));
            CommonVariable.NoteLiquidWeightMax =Convert.ToDouble( SaveStatic.ReadIni(GlobalValues.PathVariable.fileCommonPara, "MainPage_Para", "NoteLiquidWeightMax"));
        }



    }
}

